<?php
session_start();
require_once '../header.php';
$webroot="../";
require_once '../html/admintemplate.php';
function __autoload($className)
	{
    	require_once('../class/' . $className . '.class.php');
	}
session::need_manage();
if(!empty($_POST))
{
	$news=$_POST["news"];
	$date=date("d-m-Y");
	$file=fopen("news.html", "a");
	$SoureWrite='<font class="inputnews" >'.$date.":".$news.'</font><br/>';
	fwrite($file, $SoureWrite);
	fclose($file);
	$_SESSION["erro"]="Đã Đưa Thông Báo Lên";
	redirect::location("news.html");
}
else
{
	require_once '../html/addnews1.php';
}

?>